| Conditions | 3 |
| Paths | 2 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | import filter from 'feathers-query-filters' |
||
| 30 | install(Vue, options = {}) { |
||
| 31 | 36 | const extend = Vue.util.extend |
|
| 32 | // Vue 2.0 has util.toObject, but 1.0 doesn't |
||
| 33 | 36 | options = extend(extend({}, defaults), options) |
|
| 34 | |||
| 35 | 36 | if (!('feathers' in options)) { |
|
| 36 | 1 | throw new Error('No feathers instance set in options') |
|
| 37 | } |
||
| 38 | |||
| 39 | 35 | Vue.$syncer = options |
|
| 40 | 35 | Vue.prototype.$feathers = options.feathers |
|
| 41 | |||
| 42 | 35 | Vue.mixin(syncerMixin(Vue)) |
|
| 43 | // Mixin handling |
||
| 44 | 35 | Vue.config.optionMergeStrategies.sync = Vue.config.optionMergeStrategies.props |
|
| 45 | |||
| 46 | 35 | if (options.aliases) { |
|
| 47 | 1 | Vue.mixin(aliasesMixinMaker(options.aliases)) |
|
| 48 | } |
||
| 49 | } |
||
| 50 | } |
||
| 51 |